import { useRequest } from "ahooks";

export const useMessage = (fn: any) => {
  const { data, error, loading } = useRequest(fn);

  return {
    data,
    error,
    loading,
  };
};
